package com.hmdp.domain.dto;

import com.hmdp.content.MessageContent;
import lombok.Data;

import javax.validation.constraints.Pattern;

import static com.hmdp.utils.RegexPatterns.PHONE_REGEX;
import static com.hmdp.utils.RegexPatterns.VERIFY_CODE_REGEX;

@Data
public class LoginFormDTO {
    @Pattern(regexp = PHONE_REGEX, message = MessageContent.PHONE_ERROR)
    private String phone;

    @Pattern(regexp = VERIFY_CODE_REGEX,message = MessageContent.CODE_ERROR)
    //验证码
    private String code;
    private String password;
}
